import request from "@/utils/request";

// 创建banner管理
export function createBanner(data) {
  return request({
    url: "/member/banner/create",
    method: "post",
    data: data,
  });
}

// 更新banner管理
export function updateBanner(data) {
  return request({
    url: "/member/banner/update",
    method: "put",
    data: data,
  });
}

// 删除banner管理
export function deleteBanner(id) {
  return request({
    url: "/member/banner/delete?id=" + id,
    method: "delete",
  });
}

// 获得banner管理
export function getBanner(id) {
  return request({
    url: "/member/banner/get?id=" + id,
    method: "get",
  });
}

// 获得banner管理分页
export function getBannerPage(query) {
  return request({
    url: "/member/banner/page",
    method: "get",
    params: query,
  });
}

// 导出banner管理 Excel
export function exportBannerExcel(query) {
  return request({
    url: "/member/banner/export-excel",
    method: "get",
    params: query,
    responseType: "blob",
  });
}
